package 华为机试8月23日;

import java.util.Scanner;
import java.util.TreeSet;


public class 华为第二题 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            System.out.println(func(sc.nextLine()));
        }
        sc.close();
    }

    private static String func(String s) {
        char[] a = s.toCharArray();
        TreeSet<String> ts = new TreeSet<>();
        for (char x : a) {
            ts.add(String.valueOf(x));
        }
        return new StringBuilder(ts.toString().replaceAll("[\\[\\],]", "").replaceAll("\\s+", "").trim()).reverse().toString();


    }
}
